package sensors;

import lejos.nxt.Button;
import lejos.nxt.ButtonListener;

public class RightButtonListener implements ButtonListener {

	LeftButtonListener lbl;
	static int direction;
	boolean ready = false;

	public RightButtonListener(LeftButtonListener lbl) {
		this.lbl = lbl;
	}

	public void buttonPressed(Button b) {
		direction = lbl.getDirection();
		ready = true;
	}

	public void buttonReleased(Button b) {

	}

	public int getDirection() {
		return direction;
	}

	public boolean finished() {
		return ready;
	}

}
